stylecontext: always add the ARROW style class when rendering an arrow
authorCosimo Cecchi <cosimoc@gnome.org>
Fri, 2 Dec 2011 16:58:14 +0000 (11:58 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 5 Dec 2011 14:37:21 +0000 (09:37 -0500)
When gtk_render_arrow() is called, always add an ARROW style class to
the GtkStyleContext before rendering, so themes can specify a different
color for it.

https://bugzilla.gnome.org/show_bug.cgi?id=665420

gtk/gtkstylecontext.c

index 9711d038acadac9dd16aff70a96459d9134ad640..0a6b43ce7ce347c01885015f1824bb07d52b7661 100644 (file)
@@ -3716,12 +3716,16 @@ gtk_render_arrow (GtkStyleContext *context,
 
   cairo_save (cr);
 
+  gtk_style_context_save (context);
+  gtk_style_context_add_class (context, GTK_STYLE_CLASS_ARROW);
+
   store_animation_region (context, x, y, size, size);
 
   _gtk_theming_engine_set_context (priv->theming_engine, context);
   engine_class->render_arrow (priv->theming_engine, cr,
                               angle, x, y, size);
 
+  gtk_style_context_restore (context);
   cairo_restore (cr);
 }